import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/cupertino.dart' hide Action;
import 'package:www.znpigai.teacher/global_store/state.dart';

import 'item/state.dart';

class HomeworkListState
    implements GlobalBaseState, Cloneable<HomeworkListState> {
  bool isLoading = false; // 是否正在请求数据中
  String currentClassId;
  List<dynamic> classes;

  List<HomeworkState> items = <HomeworkState>[];
  int pageIndex = GlobalState.firstPageIndex; // 页面索引
  int pageTotal = 1; // 页面总数

  HomeworkListState();

  @override
  HomeworkListState clone() {
    return HomeworkListState()
      ..items = items
      ..pageIndex = pageIndex
      ..pageTotal = pageTotal
      ..currentClassId = currentClassId
      ..classes = classes
      ..isLoading = isLoading;
  }

  @override
  Color themeColor;

  @override
  Map<String, dynamic> userInfo;
}
